package org.example.actualcombat.demos.web.modules.ums.controller;

import org.example.actualcombat.demos.web.common.api.CommonResult;
import org.example.actualcombat.demos.web.modules.ums.model.UmsMemberLevelModel;
import org.example.actualcombat.demos.web.modules.ums.service.UmsMemberLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/memberLevel")
public class UmsMemberLevelController {
    @Autowired
    UmsMemberLevelService service;
    @RequestMapping(value = "/list",method = RequestMethod.GET)
    public CommonResult getMemberLevel(@RequestParam("defaultStatus") String defaultStatus){
        List<UmsMemberLevelModel> list = service.getMemberList(defaultStatus);// 这里不报错了,继续写下去. 然后的话写mp的自动创建代码吗?
        return CommonResult.success(list);
    }

}
